'''
# Coding:utf-8
# Project: python-utility
# Author: rtf
# Time: 2022-08-19 15:22:38
# FileName: faker_news.py
# Software: PyCharm
'''

from faker import Faker
from faker.providers import internet
from pprint import pprint

# fake = Faker(['it_IT', 'en_US', 'ja_JP'])


# 数据生成器
def profile(num=10):
    _list = list()
    fake = Faker(['zh_CN'])
    print(f'名字:{fake.name()}')  # 名字
    print(f'用户名:{fake.user_name()}')  # 用户名
    print(f'地址:{fake.address()}')  # 地址
    print(f'货币:{fake.currency()}')  # 货币
    print(f'时间:{fake.date_time()}')  # 时间
    print(f'职位:{fake.job()}')  # 职位
    print(f'手机号码:{fake.phone_number()}')  # 手机号码
    print(f'个人信息:{fake.profile()}')  # 个人信息
    print(f'颜色:{fake.color()}')  # 颜色
    print(f'城市:{fake.country()}')  # 城市
    print(f'银行卡信息:{fake.credit_card_full()}')  # 银行卡信息
    for _ in range(num):
        _list.append(fake.profile())
    return _list


def ip_address(num=10):
    fake = Faker()
    fake.add_provider(internet)
    _list = list()
    for _ in range(num):
        _list.append(fake.ipv4_private())
    return _list


print(ip_address())
print(profile(1))